<?php

namespace App\Http\Requests;



class SetPhoneNumberRequest extends Request
{

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
//        return captcha_check($this->input('captcha'));
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'phone_number' => 'size:11',
            'captcha' => 'required',
        ];
    }

    public function attributes()
    {
        return [
            'phone_number' => '手机号码',
            'captcha' => '验证码',
        ];
    }
}